<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<%@include file="/WEB-INF/common/taglibs.jsp" %>

<div class="row-fluid">
   <div class="span8">
<form:form action="${ctx }/conf/edit/" method="put"
	modelAttribute="conf" id="form">
	<!-- 
	<input type="hidden" name="_method" value="put" />
	 -->
         <div class="title">
            <h4 class="clearfix">
               <span class="left">
					Side Config
	            </span>
               <span class="box-form right">
               		<button class="btn btn-success btn-mini" type="submit">Submit</button>
               	
               </span>
            </h4>
         </div>
         <div class="content form-horizontal clearfix">
            <div class="form-row">
               <label class="form-label span4">HostName </label>
               <input class="span8" name="hostName" type="text" value="${conf.hostName}" />
            </div>
         
		   <div class="form-row">
               <label class="form-label span4">Template Resource Path </label>
               <input class="span8" name="templatePath" type="text" value="${conf.templatePath}" />
            </div>
		   <div class="form-row">
               <label class="form-label span4">Template Store Path </label>
               <input class="span8" name="templateFileStore" type="text" value="${conf.templateFileStore}" />
            </div>
            
            <div class="form-row row-fluid">
               <label class="form-label span4">Resource Store Path</label>
               <input class="span8" disabled="disabled"   type="text" value="${conf.resourcePath}" />
            </div>
            <div class="form-row row-fluid">
               <label class="form-label span4">Security Resource Stroe Path</label>
               <input class="span8" disabled="disabled"  type="text" value="${conf.securityResourcePath}" />
            </div>
            <div class="form-row row-fluid">
               <label class="form-label span4">Allowed Security Resource Types</label>
               <input class="span8" name="allowedSecurityResourceTypes" type="text" value="${conf.allowedSecurityResourceTypes}" />
            </div>
            
             <div class="form-row row-fluid">
               <label class="form-label span4">Photo Store Path</label>
               <input class="span8" disabled="disabled"  type="text" value="${conf.photoPath}" />
            </div>
            
            
            <div class="form-row row-fluid">
               <label class="form-label span4">Allowed Image Type</label>
               <input class="span8" name=allowedPhotoTypes type="text" value="${conf.allowedPhotoTypes}" />
            </div>
            
             <div class="form-row row-fluid">
               <label class="form-label span4">Attachment Path</label>
               <input class="span8" name=attachmentPath type="text" value="${conf.attachmentPath}" />
            </div>
            
            
             <div class="form-row row-fluid">
               <label class="form-label span4">Allowed Image Type</label>
               <input class="span8" name=maxResourceSize type="text" value="${conf.maxResourceSize}" />
            </div>
            
         </div>
	</form:form>
	 <c:if test="${!conf.inited}">   
	 <form:form action="${ctx }/conf/edit/" method="delete">
	 <button class="btn btn-primary"  type="submit">Init Templates</button>
	</form:form>
	</c:if>
   </div>
</div>